# Contributor: Celeste <cielesti@protonmail.com>
# Maintainer: Celeste <cielesti@protonmail.com>
pkgname=py3-django-hatchway
pkgver=0.5.2
pkgrel=0
pkgdesc="Django API framework inspired by FastAPI"
url="https://pypi.org/project/django-hatchway/"
arch="noarch"
license="BSD-3-Clause"
depends="
	py3-django
	py3-pydantic
	"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
checkdepends="py3-pytest-django"
subpackages="$pkgname-pyc"
source="https://github.com/andrewgodwin/django-hatchway/archive/$pkgver/py3-django-hatchway-$pkgver.tar.gz"
builddir="$srcdir/django-hatchway-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
f94703c4a8eedc51c8a7e8070fdc386c095f7a3b951c84f57730c9964fb95743e1d25d344e999caa3736785f51b626593a34258cf0220ae12ee8c158d843f526  py3-django-hatchway-0.5.2.tar.gz
"
